#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
void tai(char* arr)
{
	char ret = 0;
	while (*arr != '#')
	{
		if (*arr >= 65 && *arr <= 90)
		{
			ret = *arr + 32;
			printf("%c", ret);
		}
		else if (*arr >= 97 && *arr <= 122)
		{
			ret = *arr - 32;
			printf("%c", ret);
		}
		else
		{
			printf("%c", *arr);
		}
		arr++;
	}
}
int main()
{
	char arr[100] = {0};
	gets(arr);
	tai(&arr);
	return 0;
}